package com.iflysse.dao;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.iflysse.dto.StudentIntelligentDto;

public interface StudentIntelligentDao {
	/**
	 * 返回智能推荐列表
	 * @param studentId
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	@Select("SELECT DISTINCT course_cover,course_name,c.resource_type,c.resource_id,c.resource_title "
			+ "FROM tb_course a inner JOIN tb_chapter b ON a.course_id=b.course_id "
			+ "inner JOIN tb_chapter_resource c ON c.chapter_id=b.chapter_id "
			+ "INNER JOIN tb_task_learn_record d ON d.chapter_id=b.chapter_id INNER JOIN tb_student e ON e.student_id=d.student_id "
			+ "where e.student_id=#{studentId}")
	List<StudentIntelligentDto> getStudentIntelligent(String studentId,Integer pageIndex,Integer pageSize);
}
